/**
 * 
 */
package com.swim.natatoriumorder.entity;

import org.hibernate.validator.constraints.NotBlank;
import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotNull;

import com.jeesite.common.entity.DataEntity;
import com.jeesite.common.mybatis.annotation.Column;
import com.jeesite.common.mybatis.annotation.Table;
import com.jeesite.common.mybatis.mapper.query.QueryType;

/**
 * 订单学员Entity
 * @author 刘军武
 * @version 2021-03-23
 */
@Table(name="t_order_student", alias="a", columns={
		@Column(name="id", attrName="id", label="唯一标识", isPK=true),
		@Column(name="natatorium_order_id", attrName="natatoriumOrderId", label="游泳馆订单表id"),
		@Column(name="natatorium_info_id", attrName="natatoriumInfoId", label="游泳馆id"),
		@Column(name="name", attrName="name", label="姓名", queryType=QueryType.LIKE),
		@Column(name="sex", attrName="sex", label="性别 1表示男 2表示女"),
		@Column(name="phone", attrName="phone", label="手机号"),
		@Column(name="age", attrName="age", label="年龄"),
		@Column(name="address", attrName="address", label="居住地址"),
		@Column(includeEntity=DataEntity.class),
	}, orderBy="a.update_date DESC"
)
public class OrderStudent extends DataEntity<OrderStudent> {
	
	private static final long serialVersionUID = 1L;
	private String natatoriumOrderId;		// 游泳馆订单表id
	private String natatoriumInfoId;		// 游泳馆id
	private String name;		// 姓名
	private Long sex;		// 性别 1表示男 2表示女
	private String phone;		// 手机号
	private Long age;		// 年龄
	private String address;		// 居住地址
	
	public OrderStudent() {
		this(null);
	}

	public OrderStudent(String id){
		super(id);
	}
	
	@NotBlank(message="游泳馆订单表id不能为空")
	@Length(min=0, max=64, message="游泳馆订单表id长度不能超过 64 个字符")
	public String getNatatoriumOrderId() {
		return natatoriumOrderId;
	}

	public void setNatatoriumOrderId(String natatoriumOrderId) {
		this.natatoriumOrderId = natatoriumOrderId;
	}
	
	@NotBlank(message="游泳馆id不能为空")
	@Length(min=0, max=64, message="游泳馆id长度不能超过 64 个字符")
	public String getNatatoriumInfoId() {
		return natatoriumInfoId;
	}

	public void setNatatoriumInfoId(String natatoriumInfoId) {
		this.natatoriumInfoId = natatoriumInfoId;
	}
	
	@NotBlank(message="姓名不能为空")
	@Length(min=0, max=20, message="姓名长度不能超过 20 个字符")
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
	
	@NotNull(message="性别 1表示男 2表示女不能为空")
	public Long getSex() {
		return sex;
	}

	public void setSex(Long sex) {
		this.sex = sex;
	}
	
	@NotBlank(message="手机号不能为空")
	@Length(min=0, max=20, message="手机号长度不能超过 20 个字符")
	public String getPhone() {
		return phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}
	
	@NotNull(message="年龄不能为空")
	public Long getAge() {
		return age;
	}

	public void setAge(Long age) {
		this.age = age;
	}
	
	@NotBlank(message="居住地址不能为空")
	@Length(min=0, max=150, message="居住地址长度不能超过 150 个字符")
	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}
	
}